home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / DRVLIB.NIC / NPPCI / OEMSETUP.INF < prev   
INI File  |  1996-07-31  |  27KB  |  797 lines

  1. !G:DebugOutputControl = 1
  2. [Identification]
  3.     OptionType = NetAdapter
  4. [PlatformsSupported]
  5.     PCI
  6.     "Jazz-Internal Bus"
  7. [Options]
  8.     NCPF
  9. [RcvBufChoices]
  10. RcvBuf_8 = "8",8
  11. RcvBuf_16 = "16",16
  12. RcvBuf_32 = "32",32
  13. RcvBuf_48 = "48",48
  14. RcvBuf_64 = "64",64
  15. [XmtBufChoices]
  16. XmtBuf_8 = "8",8
  17. XmtBuf_16 = "16",16
  18. XmtBuf_32 = "32",32
  19. XmtBuf_48 = "48",48
  20. XmtBuf_64 = "64",64
  21. ;VLAN
  22. [VLANChoices]
  23. VLAN_0 = "0",0
  24. VLAN_1 = "1",1
  25. VLAN_2 = "2",2
  26. VLAN_3 = "3",3
  27. VLAN_4 = "4",4
  28. VLAN_5 = "5",5
  29. VLAN_6 = "6",6
  30. VLAN_7 = "7",7
  31. VLAN_8 = "8",8
  32. VLAN_9 = "9",9
  33. VLAN_10 = "10",10
  34. VLAN_11 = "11",11
  35. VLAN_12 = "12",12
  36. VLAN_13 = "13",13
  37. VLAN_14 = "14",14
  38. VLAN_15 = "15",15
  39. [FileConstants]
  40. UtilityInf      = "UTILITY.INF"
  41. subroutineinf   = "SUBROUTN.INF"
  42. SoftwareType    = "driver"
  43. Exit_Code       = 0
  44. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  45. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  46. Manufacturer    = "Microsoft"
  47. ProductMajorVersion     = "3"
  48. ProductMinorVersion     = "1"
  49. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  50. ProductSoftwareName     = "NCPF"
  51. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\ncpf.sys"
  52. NetRuleSoftwareType     = "ncpfSys ndisDriver ncpfDriver"
  53. NetRuleSoftwareUse      = $(SoftwareType)
  54. NetRuleSoftwareBindForm = """NcpfSys"" yes no container"
  55. NetRuleSoftwareClass    = {"ncpfDriver basic"}
  56. NetRuleSoftwareBindable = {"ncpfDriver ncpfAdapter non exclusive 100"}
  57. ProductHardwareName     = "NCPF"
  58. NetRuleHardwareType     = "ncpf ncpfAdapter"
  59. NetRuleHardwareBindForm = " yes yes container"
  60. NetRuleHardwareClass    = {"ncpfAdapter basic"}
  61. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  62. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  63. VersionKeyName  = $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion"
  64. VendorId = 4540
  65. DeviceId = 1
  66. [GeneralConstants]
  67. from      = ""
  68. to        = ""
  69. ExitCodeOk     = 0
  70. ExitCodeCancel = 1
  71. ExitCodeFatal  = 2
  72. KeyNull         = ""
  73. MAXIMUM_ALLOWED   = 33554432
  74. RegistryErrorIndex = NO_ERROR
  75. KeyProduct      = ""
  76. KeyParameters   = ""
  77. TRUE            = 1
  78. FALSE           = 0
  79. NoTitle            = 0
  80. ExitState   = "Active"
  81. OldVersionExisted = $(FALSE)
  82. DriverPath      = $(!STF_NTPATH)\drivers
  83. [date]
  84.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  85. [Identify]
  86.     read-syms Identification
  87.     set Status     = STATUS_SUCCESSFUL
  88.     set Identifier = $(OptionType)
  89.     set Media      = #("Source Media Descriptions", 1, 1)
  90.     Return $(Status) $(Identifier) $(Media)
  91. [ReturnOptions]
  92.     set Status        = STATUS_FAILED
  93.     set OptionList     = {}
  94.     set OptionTextList = {}
  95.     set LanguageList = ^(LanguagesSupported, 1)
  96.     Ifcontains(i) $($0) in $(LanguageList)
  97.         ifstr(i) $($1) == ""
  98.            goto returnoptions
  99.         endif
  100.         set PlatformList = ^(PlatformsSupported, 1)
  101.         Ifcontains(i) $($1) in $(PlatformList)
  102.            goto returnoptions
  103.         else
  104.            set Status = STATUS_NOTSUPPORTED
  105.            goto finish_ReturnOptions
  106.         endif
  107.     else
  108.         set Status = STATUS_NOLANGUAGE
  109.         goto finish_ReturnOptions
  110.     endif
  111. returnoptions = +
  112.     set OptionList     = ^(Options, 1)
  113.     set OptionTextList = ^(OptionsText$($0), 1)
  114.     set Status         = STATUS_SUCCESSFUL
  115. finish_ReturnOptions = +
  116.     Return $(Status) $(OptionList) $(OptionTextList)
  117. [InstallOption]
  118.     set Option   = $($1)
  119.     set SrcDir   = $($2)
  120.     set AddCopy  = $($3)
  121.     set DoCopy   = $($4)
  122.     set DoConfig = $($5)
  123.     set LanguageList = ^(LanguagesSupported, 1)
  124.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  125.         Return STATUS_NOLANGUAGE
  126.     endif
  127.     Debug-Output "OEMNADNP.INF: STF_CWDIR is: "$(!STF_CWDIR)
  128.     Debug-Output "OEMNADNP.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  129.     set-subst LF = "\n"
  130.     read-syms GeneralConstants
  131.     read-syms FileConstants
  132.     read-syms DialogConstants$(!STF_LANGUAGE)
  133.     ifstr(i) $(!NTN_Origination) == "NCPA"
  134.         set Continue = $(OK)
  135.     endif
  136.     read-syms FileConstants$(!STF_LANGUAGE)
  137.     detect date
  138.     set-title  $(FunctionTitle)
  139.     set to   = Begin
  140.     set from = Begin
  141.     set CommonStatus = STATUS_SUCCESSFUL
  142.     EndWait
  143. Begin = +
  144.     set !G:DebugOutputControl = 1
  145.        Debug-Output "Start version detection..."
  146. ;
  147. ;       detect NT version number
  148. ;
  149.     OpenRegKey $(!REG_H_LOCAL) "" $(VersionKeyName) $(MAXIMUM_ALLOWED) KeyVersion
  150.     GetRegValue $(KeyVersion),"CurrentVersion",VersionStruct
  151.     CloseRegKey $(KeyVersion)
  152.     Set NTVersion = *($(VersionStruct),4)
  153.     Debug-Output "NTVer:"$(NTVersion)
  154. ;
  155. ;       Determine correct path based on OS version        
  156. ;
  157.  
  158.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  159.         set StartLabel = removeadapter
  160.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  161.         set StartLabel = UpgradeSoftware
  162.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  163.         set StartLabel = bindingadapter
  164.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  165.         set CommonStatus = STATUS_REBOOT
  166. ;VLAN
  167.         set StartLabel = configureadapter
  168.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  169.             Debug-Output "Cannot configure the NP driver software."
  170.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  171.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  172.                 Debug-Output "ShellCode error: cannot get an error string."
  173.                 goto ShellCodeError
  174.             endif
  175.             set Error = $($R0)
  176.             set from = end
  177.             set to = end
  178.             goto nonfatalinfo
  179.         endif
  180.     else
  181.         set StartLabel = installadapter
  182.         set OEM_ABANDON_OPTIONS = {}
  183.         set OEM_ABANDON_SOFTWARE = FALSE
  184.         set OEM_ABANDON_ON = TRUE
  185.     endif
  186.     set EditTextIn = "1"
  187.     set from = $(fatal)
  188.     set to = $(fatal)
  189.     goto $(StartLabel)
  190. installadapter = +
  191.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  192.     Debug-Output "installadapter"
  193.     Ifstr $(KeyProduct) != $(KeyNull)
  194.         CloseRegKey $(KeyProduct)
  195.         ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  196.            Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  197.                $(ProductVersion)
  198.         Debug-Output "NCPF : After verExistedDlg"
  199.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  200.                Debug-Output "ShellCode error: cannot get an error string."
  201.                goto ShellCodeError
  202.            endif
  203.            goto end
  204.         else
  205.            Shell $(UtilityInf), CardExistedDlg
  206.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  207.            Debug-Output "NCPF : After cardExistedDlg"
  208.                Debug-Output "ShellCode error: cannot get an error string."
  209.                goto ShellCodeError
  210.            endif
  211.            ifstr(i) $($R1) != "OK"
  212.                set CommonStatus = STATUS_USERCANCEL
  213.                goto end
  214.            endif
  215.            set OldVersionExisted = $(TRUE)
  216.         endif
  217.     endif
  218.     Debug-Output "installadapter2"
  219.     goto adapteroptions
  220. configureadapter = +
  221.     Debug-Output "configureadapter"
  222. ;VLAN
  223.     Ifstr(i) $(KeyProduct) == $(KeyNull)
  224.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  225.         Ifstr $(KeyProduct) == $(KeyNull)
  226.             Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  227.             Debug-Output "OEMSETUP.INF: Cannot find component product key"
  228.             Goto fatalregistry
  229.         Endif
  230.     Endif
  231.     Debug-Output "OEMSETUP.INF: INF: Shelling to FindService"
  232.     Shell $(UtilityInf) FindService, $(KeyProduct)
  233.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  234.         Debug-Output "OEMSETUP.INF: INF: FindService shell failure"
  235.         Goto ShellCodeError
  236.     Endif
  237.     Ifstr(i) $($R0) != NO_ERROR
  238.         Debug-Output "OEMSETUP.INF: INF: FindService Shell error: "$($R0)
  239.         Goto fatalregistry
  240.     endif
  241.     set KeyParameters = $($R2)
  242.     CloseRegKey $($R1)
  243.     Ifstr $(KeyParameters) == $(KeyNull)
  244.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  245.         Debug-Output "OEMSETUP.INF: Cannot find component service"
  246.         goto fatalregistry
  247.     endif
  248.     set OldVersionExisted = $(TRUE)
  249.     set ValueName = ""
  250.     set ValueData = ""
  251.     set ValueStr  = ""
  252.     set ValueList = {}
  253.     EnumRegValue $(KeyParameters) ValueList
  254.     ForListDo $(ValueList)
  255.         set ValueItem = $($)
  256.         set ValueName = *($(ValueItem),1)
  257.         set ValueData = *($(ValueItem),4)
  258.         ifstr(i) $(ValueName) == "FunctionNumber"
  259.             set FunctionNum = $(ValueData)
  260.         else-ifstr(i) $(ValueName) == "BusNumber"
  261.             set BusNum = $(ValueData)
  262.         else-ifstr(i) $(ValueName) == "VirtualLANNumber"
  263.             set VLANValue = $(ValueData)
  264.         else-ifstr(i) $(ValueName) == "ReceiveBuffers"
  265.             set RcvBufValue = $(ValueData)
  266.         else-ifstr(i) $(ValueName) == "TransmitBuffers"
  267.             set XmtBufValue = $(ValueData)
  268.         else-ifstr(i) $(ValueName) == "SlotNumber"
  269.             set DeviceNum = $(ValueData)
  270.         endif
  271.     EndForListDo
  272. adapteroptions = +
  273.     Debug-Output "adapteroptions"
  274.     set from = adapteroptions
  275.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  276.     ui start "InputDlg"
  277.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  278.         set VLANIndex = $(Combo1Out)
  279.         set RcvBufIndex = $(Combo2Out)
  280.         set XmtBufIndex = $(Combo3Out)
  281.         ui pop 1
  282.         goto nextstep
  283.     else-ifstr(i) $(DLGEVENT) == "BACK"
  284.         set CommonStatus = STATUS_USERCANCEL
  285.         Debug-Output "OEMSETUP.INF: Action: exit. Bye."
  286.         ui pop 1
  287.         goto end
  288.     else
  289.         ui pop 1
  290.         Debug-Output "OEMSETUP.INF: Action: unknown. Bye."
  291.         goto end
  292.     endif
  293.     Ifstr(i) $(StartLabel) == "configureadapter"
  294.         goto writeconfig
  295.     endif
  296. nextstep = +
  297.     StartWait
  298.     Ifstr(i) $(!NTN_InstallMode) == configure
  299.         goto writeconfig
  300.     endif
  301. installproduct = +
  302.     Debug-Output "Version = ":$(NTVersion)
  303.     ifstr(i) $(NTVersion) == "3.50"
  304.         set AdapterList = {{0,0,0}}
  305.     else
  306.         Debug-Output "installproduct"
  307.          Shell $(UtilityInf) GetPCIInformation, $(VendorId), $(DeviceId)
  308.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  309.             goto ShellCodeError
  310.         endif
  311.         ifstr(i) $($R0) == {}
  312.             goto fatal
  313.         endif
  314.         set AdapterList = $($R0)
  315.     endif
  316.     Debug-Output "NCPF: AdapterList: "$(AdapterList)
  317.  
  318.     ifint $(OldVersionExisted) == $(FALSE)
  319.         Debug-Output "no OldVersionExisted."
  320.         ifstr(i) $(!NTN_InstallMode) == "install"
  321.             Ifstr(i) $(DoCopy) == "YES"
  322.                 Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  323.                 Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  324.                     Goto ShellCodeError
  325.                 Else-Ifstr(i) $($R0) == STATUS_FAILED
  326.                     Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  327.                     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  328.                         goto ShellCodeError
  329.                     endif
  330.                     set Error = $($R0)
  331.                     Goto fatal
  332.                 Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  333.                     Goto successful
  334.                 Endif
  335.                 Set SrcDir = $($R1)
  336.             Endif
  337.             install "Install-Option"
  338.             ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  339.                 Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  340.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  341.                     goto ShellCodeError
  342.                 endif
  343.                 set Error = $($R0)
  344.                 goto fatal
  345.             endif
  346.         endif
  347.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  348.             $(ProductSoftwareName), +
  349.             $(ProductSoftwareName), +
  350.             $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  351.             $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  352.             $(NetEventDLL)
  353.         Set OEM_ABANDON_SOFTWARE = TRUE
  354.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  355.             goto ShellCodeError
  356.         endif
  357.         set RegistryErrorIndex = $($R0)
  358.         set KeyProduct      = $($R1)
  359.         Set SoftNetRulesKey = $($R2)
  360.         CloseRegKey $($R3)
  361.         CloseRegKey $($R4)
  362.         CloseRegKey $($R5)
  363.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  364.             EndWait
  365.             Debug-Output " Registry error:  add software component"
  366.             CloseRegKey $(KeyProduct)
  367.             CloseRegKey $(SoftNetRulesKey) 
  368.             goto fatalregistry
  369.         endif
  370.         Set SoftProductKey      = $($R1)
  371.         Set SoftNetRuleKey      = $($R2)
  372.         Set SoftServiceKey      = $($R3)
  373.         Set SoftParameterKey    = $($R4)
  374.         Set SoftLinkageKey      = $($R5)
  375.         set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  376.                                 {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  377.                                 {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  378.                                 {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  379.                                 {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  380.                                 {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  381.                                 {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  382.         Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  383.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  384.             goto ShellCodeError
  385.         endif
  386.         set RegistryErrorIndex = $($R0)
  387.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  388.             EndWait
  389.             Debug-Output "Registry error: add value list."
  390.             CloseRegKey $(KeyProduct)
  391.             CloseRegKey $(SoftNetRulesKey) 
  392.             goto fatalregistry
  393.         endif
  394.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  395.                                 {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  396.                                 {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  397.                                 {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  398.                                 {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  399.                                 {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  400.         Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  401.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  402.             goto ShellCodeError
  403.         endif
  404.  
  405.         set RegistryErrorIndex = $($R0)
  406.         CloseRegKey $(KeyProduct)
  407.         CloseRegKey $(SoftNetRulesKey)
  408.  
  409.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  410.             EndWait
  411.             Debug-Output "Registry error: add value list."
  412.             goto fatalregistry
  413.         endif
  414.         set RegistryErrorIndex = $($R0)
  415.      endif
  416.     ForListDo $(AdapterList)
  417.         set BusNum = *($($),1)
  418.         set DeviceNum = *($($),2)
  419.         set FunctionNum = *($($),3)
  420.         Debug-Output $(BusNum)
  421.         Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(BusNum), +
  422.                     $(DeviceNum), $(ProductHardwareDescription), $(ProductHardwareName)
  423.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  424.             goto ShellCodeError
  425.         endif
  426.         ifstr $($R0) != "NO_ERROR"
  427.             Debug-Output "NCPF: after Netcard installed"
  428.             set Error = $($R0)
  429.             goto fatal
  430.         endif
  431.         Debug-Output "NCPF: before yes"
  432.         ifstr(i) $($R1) != "YES"
  433.             Debug-Output "NetCardNOTAlreadyInstalled"
  434.             Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  435.             ifint $($R4) != -1
  436.                 Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  437.             endif
  438.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  439.                 goto ShellCodeError
  440.             endif
  441.             set RegistryErrorIndex = $($R0)
  442.             Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  443.                 EndWait
  444.                 CloseRegKey $($R1)
  445.                 CloseRegKey $($R2)
  446.                 CloseRegKey $($R3)
  447.                 goto fatalregistry
  448.             endif
  449.             Set HardNetCardKey      = $($R1)
  450.             Set HardNetRuleKey      = $($R2)
  451.             Set HardParameterKey    = $($R3)
  452.             set AdapterNumber = $($R4)
  453.             set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  454.                                     {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardwareTitle)},+
  455.                                     {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareDescription)},+
  456.                                     {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  457.                                     {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  458.                                     {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  459.                                     Shell  $(UtilityInf), AddValueList, $(HardNetCardKey), $(NewValueList)
  460.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  461.                 goto ShellCodeError
  462.             endif
  463.             set VLANValue = *($(VLANValues), ~($(VLANList),$(VLANIndex)))
  464.             set RcvBufValue = *($(RcvBufvalues), ~($(RcvBufList),$(RcvBufIndex)))
  465.             set XmtBufValue = *($(XmtBufvalues), ~($(XmtBufList),$(XmtBufIndex)))
  466.             set NewValueList = {{BusType,$(NoTitle),$(!REG_VT_DWORD),5},+
  467.                                     {MediaType,$(NoTitle),$(!REG_VT_DWORD),3},+
  468.                                 {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  469.                                 {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(DeviceNum)},+
  470.                                 {FunctionNumber,$(NoTitle),$(!REG_VT_DWORD),$(FunctionNum)},+
  471.                                 {VirtualLANNumber,$(NoTitle),$(!REG_VT_DWORD),$(VLANValue)},+
  472.                                 {ReceiveBuffers,$(NoTitle),$(!REG_VT_DWORD),$(RcvBufIndex)},+
  473.                                 {TransmitBuffers,$(NoTitle),$(!REG_VT_DWORD),$(XmtBufIndex)}}
  474.             Shell  $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  475.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  476.                 goto ShellCodeError
  477.             endif
  478.             set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  479.             set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  480.             set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  481.                                     {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  482.                                     {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  483.                                 {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  484.             Shell  $(UtilityInf), AddValueList, $(HardNetRuleKey), $(NewValueList)
  485.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  486.                 goto ShellCodeError
  487.             endif
  488.             CloseRegKey $(HardNetCardKey)
  489.             CloseRegKey $(HardNetRuleKey)
  490.             CloseRegKey $(HardParameterKey)
  491.         endif
  492.     EndForListDo
  493.     endif
  494.     goto writeparameters
  495. writeconfig = +
  496.     Debug-Output "writeconfig"
  497.     set VLANValue = *($(VLANValues), ~($(VLANList),$(VLANIndex)))
  498.     set RcvBufValue = *($(RcvBufValues), ~($(RcvBufList),$(RcvBufIndex)))
  499.     set XmtBufValue = *($(XmtBufValues), ~($(XmtBufList),$(XmtBufIndex)))
  500.     set NewValueList = {{BusType,$(NoTitle),$(!REG_VT_DWORD),5},+
  501.                             {MediaType,$(NoTitle),$(!REG_VT_DWORD),3},+
  502.                             {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  503.                             {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(DeviceNum)},+
  504.                             {FunctionNumber,$(NoTitle),$(!REG_VT_DWORD),$(FunctionNum)},+
  505.                             {VirtualLANNumber,$(NoTitle),$(!REG_VT_DWORD),$(VLANValue)},+
  506.                             {ReceiveBuffers,$(NoTitle),$(!REG_VT_DWORD),$(RcvBufIndex)},+
  507.                             {TransmitBuffers,$(NoTitle),$(!REG_VT_DWORD),$(XmtBufIndex)}}
  508.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  509.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  510.         goto ShellCodeError
  511.     endif
  512.     Set RegistryErrorIndex = $($R0)
  513.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  514.         Debug-Output "OEMSETUP.INF: Registry error: Add value list"
  515.         goto fatalregistry
  516.     Endif
  517. writeparameters = +
  518.     Debug-Output "NCPF: writeparameters"
  519.     EndWait
  520.     goto successful
  521. bindingadapter =+
  522.     set Error = "Binding: Sorry, not yet implemented."
  523.     goto fatal
  524. removeadapter = +
  525.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  526.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  527.             $(ProductSoftwareName)
  528.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  529.             Debug-Output "ShellCode error"
  530.             goto ShellCodeError
  531.         endif
  532.         set RegistryErrorIndex = $($R0)
  533.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  534.             goto fatalregistry
  535.         endif
  536.     else
  537.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  538.             $(ProductSoftwareName), $(!NTN_RegBase)
  539.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  540.             Debug-Output "ShellCode error"
  541.             goto ShellCodeError
  542.         endif
  543.         set RegistryErrorIndex = $($R0)
  544.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  545.             goto fatalregistry
  546.         endif
  547.     endif
  548.     goto end
  549. UpgradeSoftware = +
  550.     ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  551.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  552.         Ifstr $(KeyProduct) != $(KeyNull)
  553.             GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  554.             set Version = *($(VersionInfo), 4)
  555.             Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  556.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  557.                 Debug-Output "ShellCode error"
  558.                 goto ShellCodeError
  559.             endif
  560.             set !UG_Filename = $($R0)
  561.             ifstr(i) $(!UG_Filename) != ""
  562.                 install "Install-Update"
  563.             ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  564.                 goto fatal
  565.             endif
  566.         endif
  567.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  568.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  569.         ifint $(Version) != $(ProductVersion)
  570.             endif
  571.             CloseRegKey $(KeyProduct)
  572.         else    
  573.             goto fatalregistry
  574.         endif
  575.     else
  576.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) +
  577.             $(MAXIMUM_ALLOWED) NetworkCardKey
  578.         Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  579.             GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  580.             set ServiceName = *($(ServiceNameInfo), 4)
  581.             OpenRegKey $(NetworkCardKey) "" "NetRules" +
  582.                 $(MAXIMUM_ALLOWED) NetRuleKey
  583.             Ifstr(i) $(NetRuleKey) != $(KeyNull)
  584.             else
  585.                 goto fatalregistry
  586.             endif
  587.             CloseRegKey $(NetRules)
  588.             CloseRegKey $(NetworkCardKey)
  589.         else
  590.             goto fatalregistry
  591.         endif
  592.     OpenRegKey $(!REG_H_LOCAL) "" +
  593.         $(!NTN_ServiceBase)"\"$(ServiceName) +
  594.         $(MAXIMUM_ALLOWED) ServiceKey
  595.     Ifstr(i) $(ServiceKey) != $(KeyNull)
  596.         CloseRegKey $(ServiceKey)
  597.     else
  598.         goto fatalregistry
  599.     endif
  600.     endif
  601.     goto end
  602. successful = +
  603.     goto end
  604. abandon = +
  605.     ForListDo $(OEM_ABANDON_OPTIONS)
  606.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  607.             $(ProductSoftwareName), $($)
  608.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  609.             Debug-Output "ShellCode error"
  610.             goto ShellCodeError
  611.         endif
  612.         set RegistryErrorIndex = $($R0)
  613.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  614.             goto fatalregistry
  615.         endif
  616.     EndForListDo
  617.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  618.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  619.             $(ProductSoftwareName), FALSE
  620.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  621.             Debug-Output "ShellCode error"
  622.             goto ShellCodeError
  623.         endif
  624.         set RegistryErrorIndex = $($R0)
  625.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  626.             goto fatalregistry
  627.         endif
  628.     endif
  629.     goto end
  630. warning = +
  631.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  632.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  633.         goto ShellCodeError
  634.     endif
  635.     ifstr(i) $($R1) == "OK"
  636.         goto $(to)
  637.     else-ifstr(i) $($R1) == "CANCEL"
  638.         goto $(from)
  639.     else
  640.         goto "end"
  641.     endif
  642. nonfatalinfo = +
  643.     Set CommonStatus = STATUS_USERCANCEL
  644.     Set Severity = STATUS
  645.     goto nonfatalmsg
  646. nonfatal = +
  647.     Set Severity = NONFATAL
  648.     goto nonfatalmsg
  649. nonfatalmsg = +
  650.     ifstr(i) $(Error) == ""
  651.         Set Severity = NONFATAL
  652.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  653.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  654.             goto ShellCodeError
  655.         endif
  656.         set Error = $($R0)
  657.     endif
  658.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  659.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  660.         goto ShellCodeError
  661.     endif
  662.     ifstr(i) $($R1) == "OK"
  663.         goto $(from)
  664.     else
  665.         goto "end"
  666.     endif
  667. fatalregistry = +
  668.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  669.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  670.         goto ShellCodeError
  671.     endif
  672.     set Error = $($R0)
  673.     goto fatal
  674. fatal = +
  675.     ifstr(i) $(Error) == ""
  676.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  677.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  678.             goto ShellCodeError
  679.         endif
  680.         set Error = $($R0)
  681.     endif
  682.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  683.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  684.         goto ShellCodeError
  685.     endif
  686.     goto setfailed
  687. ShellCodeError = +
  688.     set DlgType      = "MessageBox"
  689.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  690.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  691.     set STF_MB_TYPE  = 1
  692.     set STF_MB_ICON  = 3
  693.     set STF_MB_DEF   = 1
  694.     ui start "Error Message"
  695.     goto setfailed
  696. setfailed = +
  697.     set CommonStatus = STATUS_FAILED
  698.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  699.         set OEM_ABANDON_ON = FALSE
  700.         goto abandon
  701.     endif
  702.     goto end
  703. end = +
  704.     CloseRegKey $(KeyParameters)
  705.     goto term
  706. term = +
  707.     Return $(CommonStatus)
  708. [Install-Option]
  709.     set STF_VITAL = ""
  710.     ifstr(i) $(AddCopy) == "YES"
  711.         AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  712.     endif
  713.     ifstr(i) $(DoCopy) == "YES"
  714.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  715.        CopyFilesInCopyList
  716.     endif
  717.     ifstr(i) $(DoConfig) == "YES"
  718.     endif
  719.     Exit
  720. [Install-Update]
  721.    set STF_VITAL        = ""
  722.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  723.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  724.    AddSectionFilesToCopyList Files-NCPFEXE $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  725.    AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  726.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  727.    CopyFilesInCopyList
  728.    exit
  729. [Source Media Descriptions]
  730.     1  = "NPI Setup Disk"
  731.  
  732. [Signature]
  733.     FileType = MICROSOFT_DRVLIB_FILE
  734. [GetSignature]
  735.     read-syms Signature
  736.     return $(FileType)
  737.  
  738. [ProductType]
  739. STF_PRODUCT  = Winnt
  740. STF_PLATFORM = I386
  741. [Files-Inf]
  742. 1,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  743. [Files-NCPF]
  744. 1,NCPF.SYS , SIZE=158720
  745. [LanguagesSupported]
  746.     ENG
  747. [OptionsTextENG]
  748.     NCPF     = "Network Peripherals NuCard PCI FDDI"
  749. [FileConstantsENG]
  750. ProCaption   = "Windows NT Setup"
  751. ProCancel    = "Cancel"
  752. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  753.                "Are you sure you want to cancel copying files?"
  754. ProCancelCap = "Network Setup Message"
  755. ProText1     = "Copying:"
  756. ProText2     = "To:"
  757. FunctionTitle   = "Network Peripherals, NuCard PCI FDDI  Setup"
  758. ProductSoftwareDescription      = "Network Peripherals, NuCard PCI FDDI Driver"
  759. ProductHardwareDescription      = "Network Peripherals, NuCard PCI FDDI Adapter"
  760. CANNOT_FIND_ANY_CARD            = "Network card is not present in the system"
  761. ProductSoftwareTitle    = "Network Peripherals , NuCard PCI FDDI Driver"
  762. ProductHardwareTitle    = "Network Peripherals, NuCard PCI FDDI Adapter"
  763. ShellCodeErrorTitle     = "Error: "$(FunctionTitle)
  764. ShellCodeErrorText      = "Shell Code Error."
  765. RcvBufList = ^(RcvBufChoices, 1)
  766. RcvBufValues = ^(RcvBufChoices, 2)
  767. XmtBufList = ^(XmtBufChoices, 1)
  768. XmtBufValues = ^(XmtBufChoices, 2)
  769. ;VLAN
  770. VLANList  = ^(VLANChoices, 1)
  771. VLANValues = ^(VLANChoices, 2)
  772. [DialogConstantsENG]
  773. Help        = "&Help"
  774. Exit        = "Cancel"
  775. OK          = "OK"
  776. HelpContext = ""
  777. Continue    = "Continue"
  778. Cancel      = "Cancel"
  779. ;VLAN
  780. [FileDependentDlgENG]
  781. DlgType = "MultiCombo"
  782. DlgTemplate = "WD"
  783. Caption = $(FunctionTitle)
  784. Combo1Label = "&Virtual LAN Number:"
  785. Combo1List = $(VLANList)
  786. Combo1Out  = $(VLANValue)
  787. Combo2Label = "&Receive Buffers"
  788. Combo2List = $(RcvBufList) 
  789. Combo2Out = $(RcvBufValue)
  790. Combo3Label = "&Transmit Buffers"
  791. Combo3List = $(XmtBufList) 
  792. Combo3Out = $(XmtBufValue)
  793.  
  794. ComboListItemsIn  = {Combo1List, Combo2List, Combo3List}
  795. ComboListItemsOut = {Combo1Out, Combo2Out, Combo3Out}
  796. ;HelpContext = $(!IDH_DB_OEMNADLB_INS)
  797.